home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9600 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: newsbf02.news.aol.com!not-for-mail
  2. From: champalber@aol.com (Champalber)
  3. Newsgroups: comp.lang.c++
  4. Subject: How to shrink your Windows program by %80!
  5. Date: 2 Mar 1996 20:57:01 -0500
  6. Organization: America Online, Inc. (1-800-827-6364)
  7. Sender: root@newsbf02.news.aol.com
  8. Message-ID: <4hau9d$m3@newsbf02.news.aol.com>
  9. NNTP-Posting-Host: newsbf02.mail.aol.com
  10. X-Newsreader: AOL Offline Reader
  11.  
  12. How is that possable? Convert it to Pascal.
  13.  
  14. Does anybody use Turbo Pascal (TP) for Windows? Having used only
  15. BorlandC++ (BC) for Windows for the past few years, I was amazed to see
  16. how much faster TP compiled and how much smaller the resulting code was.
  17. If you have these two products try out a simple experiment: Write the
  18. "hello world. program for Windows" with each compiler, then look and see.
  19.  
  20. When I compiled with TP I thought that the compilation had stopped on an
  21. error, but no, it was just _very_ fast. In my particular case I wrote a
  22. very simple program to write a few lines of text in a window; a simple
  23. task that I wanted to spend as little time writing as possible, so I used
  24. OWL for BC, and the equivilent for TP.
  25.  
  26. The size comparison: BC - 90k,    TP - 14k!
  27. The two programs do _exactly_ the same thing.
  28.  
  29. What is surprising is that both compilers are written by Borland, and the
  30. Windows stuff in Pascal is very similar to the C++ version - same Windows
  31. functions, same sequence of functions.
  32.  
  33. Why does one compiler seem to be so much more efficient than the other?
  34. There is always the argument that "you get all the C++ goodies", but using
  35. TP you can do just about everything that you can do in BC, with seamingly
  36. increadable savings on final exe size.
  37.  
  38. Richard Champalbert
  39. champalber@aol.com
  40.  
  41. Champalbert
  42. champlaber@aol.com
  43.